package com.tedu.news;

/**
 * spring在初始化news对象时,需要注入2个对象
 */
public class News {

    private String content;
    private NewsTopic newsTopic;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public NewsTopic getNewsTopic() {
        return newsTopic;
    }

    public void setNewsTopic(NewsTopic newsTopic) {
        this.newsTopic = newsTopic;
    }

    @Override
    public String toString() {
        return "News{" +
                "content='" + content + '\'' +
                ", newsTopic=" + newsTopic +
                '}';
    }
}
